home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 … to May: Technology Seed / April-May ADC Seed.toast / AIAT 1.1 / Headers / Analysis / StopwordFilter.h < prev    next >
Encoding:
Text File  |  1998-04-10  |  1.1 KB  |  57 lines  |  [TEXT/MPCC]

  1. //    StopwordFilter.h
  2. //    Copyright:    © 1994 - 1998 by Apple Computer, Inc., all rights reserved.
  3. //
  4. //    Given an input source of tokens, this class is capable of returning the next token.
  5. //    Words on the stoplist will not be returned.
  6. //
  7. #pragma once
  8. #ifndef STOPWORDFILTER_h
  9. #define STOPWORDFILTER_h
  10.  
  11.  
  12.  
  13. #pragma import on
  14.  
  15. #if PRAGMA_STRUCT_ALIGN
  16.     #pragma options align=power
  17. #endif
  18.  
  19. #include "IAAnalysis.h"
  20.  
  21. #pragma IA_BEGIN_EXPORTS
  22.  
  23. class LetterTree;
  24. class IACharStream;
  25.  
  26. IAExceptionCode    NoInputTokenizer = 'VTNI';
  27.  
  28. class StopwordFilter : public IATokenFilter {
  29.  
  30.     
  31. public:
  32.  
  33.     StopwordFilter(IATokenStream *source, IADocText* stopwordDoc);
  34.     StopwordFilter(IATokenStream *source, char* stopwordFilePath);
  35.     
  36.     StopwordFilter( IATokenStream *source, LetterTree *stopwordDBParam )
  37.         : IATokenFilter(source), fStopwordDB(stopwordDBParam), fRemove(false) {};
  38.     
  39.     virtual ~StopwordFilter();
  40.     
  41.     virtual IAToken    *GetNextToken( void );
  42.  
  43. private:
  44.     LetterTree    *fStopwordDB;
  45.     bool        fRemove;
  46.  
  47. };
  48.  
  49. #pragma IA_END_EXPORTS
  50.  
  51. #if PRAGMA_STRUCT_ALIGN
  52.     #pragma options align=reset
  53. #endif
  54.  
  55. #pragma import reset
  56.  
  57. #endif